<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>移动</title>
    <style>

        body{
            perspective: 800px;
            transform-style:preserve-3d;
        }
        .box1{
            transform-style:preserve-3d;
            margin:100px auto;
            height: 200px;
            width: 200px;
            /* transform: rotateX(45deg); */
            animation: tr 2s alternate infinite;
            background-color: brown;
            
        }

        @keyframes tr{
            0%{
                transform: translateZ(0px);
            }
            100%{
                transform: rotateX(90deg) translateZ(100px) ;
            }
        }
    </style>
</head>
<body>
    <div class="box1"></div>
</body>
</html>